﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebProjectOrder.WebServices;

namespace WebProjectOrder.BusinessLayer
{
    public class DocumentManager
    {

         #region Atributos
        private bool _IsError;
        private String _ErrorMessage;
        private bool _DefiniteError;
        private static DocumentManager _instance;
        public List<ItemDocument> itemsDocuments =  new List<ItemDocument>();
        public List<ItemMask> itemMasks = new List<ItemMask>();
        public Document newDocument;
        
        #endregion

        #region Propiedades
        public bool IsError
        {
            get
            {
                bool temp = _IsError;
                _IsError = false;
                return temp;
            }
        }

        public String ErrorMessage
        {
            get
            {
                String temp = _ErrorMessage;
                _IsError = false;
                _ErrorMessage = "";
                return temp;
            }
        }
        #endregion

        #region Constructor
        /// <summary>
        /// Constructor privado de la clase para permitir la implementación del patrón singlenton
        /// </summary>
        private DocumentManager() 
        {
            
        }

        /// <summary>
        /// Método que obtiene la instancia existente de la clase. 
        /// </summary>
        /// <returns></returns>
        public static DocumentManager GetInstance() 
        {
            if (_instance == null)
                _instance = new DocumentManager();
            return _instance;
        }
        #endregion

        #region Métodos
        
        #endregion
    }
}